package com.hongmeng.operater.service.operaterUser.impl;

import java.util.List;
import com.hongmeng.common.utils.DateUtils;
import com.hongmeng.operater.domain.operaterUser.HmSickPeople;
import com.hongmeng.operater.mapper.operaterUser.HmSickPeopleMapper;
import com.hongmeng.operater.service.operaterUser.IHmSickPeopleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 患者信息Service业务层处理
 * 
 * @author hongmeng
 * @date 2021-03-02
 */
@Service
public class HmSickPeopleServiceImpl implements IHmSickPeopleService
{
    @Autowired
    private HmSickPeopleMapper hmSickPeopleMapper;

    /**
     * 查询患者信息
     * 
     * @param id 患者信息ID
     * @return 患者信息
     */
    @Override
    public HmSickPeople selectHmSickPeopleById(Integer id)
    {
        return hmSickPeopleMapper.selectHmSickPeopleById(id);
    }

    /**
     * 查询患者信息列表
     * 
     * @param hmSickPeople 患者信息
     * @return 患者信息
     */
    @Override
    public List<HmSickPeople> selectHmSickPeopleList(HmSickPeople hmSickPeople)
    {
        return hmSickPeopleMapper.selectHmSickPeopleList(hmSickPeople);
    }

    /**
     * 新增患者信息
     * 
     * @param hmSickPeople 患者信息
     * @return 结果
     */
    @Override
    public int insertHmSickPeople(HmSickPeople hmSickPeople)
    {
        hmSickPeople.setCreateTime(DateUtils.getNowDate());
        return hmSickPeopleMapper.insertHmSickPeople(hmSickPeople);
    }

    /**
     * 修改患者信息
     * 
     * @param hmSickPeople 患者信息
     * @return 结果
     */
    @Override
    public int updateHmSickPeople(HmSickPeople hmSickPeople)
    {
        hmSickPeople.setUpdateTime(DateUtils.getNowDate());
        return hmSickPeopleMapper.updateHmSickPeople(hmSickPeople);
    }

    /**
     * 批量删除患者信息
     * 
     * @param ids 需要删除的患者信息ID
     * @return 结果
     */
    @Override
    public int deleteHmSickPeopleByIds(Integer[] ids)
    {
        return hmSickPeopleMapper.deleteHmSickPeopleByIds(ids);
    }

    /**
     * 删除患者信息信息
     * 
     * @param id 患者信息ID
     * @return 结果
     */
    @Override
    public int deleteHmSickPeopleById(Integer id)
    {
        return hmSickPeopleMapper.deleteHmSickPeopleById(id);
    }
}
